import base from "./base"; // 导入接口域名列表
import axios from "../http"; // 导入http中创建的axios实例
import qs from "qs"; // 根据需求是否导入qs模块
const getDapp = {
  getDappProductList(params) {
    return axios.post(
      `${base.bd}/admin/dapp_product/lists`,
      qs.stringify(params)
    );
  },

  getDappProductDetail(params) {
    return axios.post(
      `${base.bd}/admin/dapp_product/edit`,
      qs.stringify(params)
    );
  },

  SaveAddDappProduct(params) {
    return axios.post(
      `${base.bd}/admin/dapp_product/saveadd`,
      qs.stringify(params)
    );
  },

  SaveEditDappProduct(params) {
    return axios.post(
      `${base.bd}/admin/dapp_product/saveedit`,
      qs.stringify(params)
    );
  },

  delDappProduct(params) {
    return axios.post(
      `${base.bd}/admin/dapp_product/del`,
      qs.stringify(params)
    );
  },

  getDappOrderList(params) {
    return axios.post(
      `${base.bd}/admin/dapp_order/lists`,
      qs.stringify(params)
    );
  },

  getDappOrderDetail(params) {
    return axios.post(`${base.bd}/admin/dapp_order/edit`, qs.stringify(params));
  },

  getDappRating(params) {
    return axios.post(
      `${base.bd}/admin/dapp_rating/lists`,
      qs.stringify(params)
    );
  },

  SaveAddDappRating(params) {
    return axios.post(
      `${base.bd}/admin/dapp_rating/saveadd`,
      qs.stringify(params)
    );
  },

  SaveEditDappRating(params) {
    return axios.post(
      `${base.bd}/admin/dapp_rating/saveedit`,
      qs.stringify(params)
    );
  },

  DelDappRating(params) {
    return axios.post(`${base.bd}/admin/dapp_rating/del`, qs.stringify(params));
  },

  getDappTeam(params) {
    return axios.post(`${base.bd}/admin/dapp_team/lists`, qs.stringify(params));
  },

  SaveAddDappTeam(params) {
    return axios.post(
      `${base.bd}/admin/dapp_team/saveadd`,
      qs.stringify(params)
    );
  },

  SaveEditDappTeam(params) {
    return axios.post(
      `${base.bd}/admin/dapp_team/saveedit`,
      qs.stringify(params)
    );
  },

  DelDappTeam(params) {
    return axios.post(`${base.bd}/admin/dapp_team/del`, qs.stringify(params));
  },

  getDappTeamDetail(params) {
    return axios.post(`${base.bd}/admin/dapp_team/edit`, qs.stringify(params));
  }
};
export default getDapp;
